Processing singleton task(s) across arbitrary autonomous server instances

ABSTRACT

Large scale internet services may be implemented using multiple discrete server instances. Some tasks of the large scale internet services may be singleton tasks, which may be advantageously processed by a sub-set of the server instances (e.g., merely one instance). Accordingly, as provided herein, a singleton task may be processed in a reliable manner based upon one or more instances of a protocol executed across a set of arbitrary autonomous server instances. In one example, the protocol may determine whether a lease for a singleton task is valid or expired. If the lease is expired, then an attempt to claim the lease may be performed by updating a current lease expiration with a new lease expiration. If the attempt is successful, then the singleton task may be processed until the new lease expiration expires.

BACKGROUND

Large scale network services may be implemented using multiple discreteserver instances in an effort to increase robustness, capacity, andperformance. These network services may be enhanced by scaling out thenumber of discrete server instances as opposed to scaling up. That is,it may be advantageous to have a large number of commodity servermachines with minimal interaction between one another in comparison to asmaller number of powerful server machines. Scaling out along withreducing accumulated state information (e.g., an affinity between a taskand a particular server instance because of cached data) may mitigatethe overhead in adding new server instances or replacing failed serverinstances. Efficiency and proper task performance (e.g., a singletontask performed by a particular number of server instances) may be becomean issue when introducing new server instances into an always on networkservice environment.

SUMMARY

This Summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key factors oressential features of the claimed subject matter, nor is it intended tobe used to limit the scope of the claimed subject matter.

A technique for processing a singleton task is disclosed herein. Asingleton task, for example, may be a task (e.g., retrieve email,retrieve SMS messages, a task performed by one or more server instanceswithin a computing environment, etc.) in which it may be beneficial thata particular number of server instances perform the task. For example,it may be advantageous for merely a single server instance to perform anemail retrieval singleton task, while other processing tasks related tothe retrieved email may be performed by multiple server instances. Alease may be associated with a singleton task (e.g., a row within adatabase comprising a lease expiration associated with a lease of thesingleton task) to facilitate the processing of the singleton task inaccordance with a contract (e.g., a designation of a particular numberof server instances that may process a singleton task).

A lease for a singleton task may be determined, for example, by a serverinstance executing a protocol, as valid or expired. For example, acurrent lease expiration of the lease may be compared with a currenttime to determine whether the lease is expired (e.g., the lease isexpired if the current time exceeds the current lease expiration, thelease is valid if the current time does not exceed the current leaseexpiration or rather the current lease expiration exceeds the currenttime). If the lease is valid, then the server instance may wait untilthe current time exceeds the current lease expiration (e.g., ananticipated expiration of the current lease) and then again determinewhether the lease for the singleton task is valid or expired. Otherwise,if the lease is expired, then an attempt may be made to claim the leasewith a new lease expiration. For example, an attempt may be made toupdate a database row comprising the current lease expiration of thelease with the new lease expiration.

If the attempt to claim the lease is unsuccessful (e.g., another serverinstance successfully updated the database row with a claim to thelease), then the server instance may again determine whether the leasefor the singleton task is valid or expired. Otherwise, if the attempt toclaim the lease is successful, then the singleton task may be processeduntil the new lease expiration expires. Attempts by other serverinstances may be unsuccessful, which provides that the singleton task isperformed according to a contract specifying, for example, that oneserver instance may perform the singleton task (e.g., the one serverinstances successfully claiming the lease), while the unsuccessfulserver instances may try again later (e.g., when the new leaseexpiration expires). It may be appreciated that the technique forprocessing a singleton task described herein may be, for example,incorporated into a protocol executed by a large number of serverinstances (e.g., hundreds of server instances participating in a networkservice environment) to facilitate the processing of one or moresingleton tasks based upon respective contracts of the one or moresingleton tasks.

To the accomplishment of the foregoing and related ends, the followingdescription and annexed drawings set forth certain illustrative aspectsand implementations. These are indicative of but a few of the variousways in which one or more aspects may be employed. Other aspects,advantages, and novel features of the disclosure will become apparentfrom the following detailed description when considered in conjunctionwith the annexed drawings.

DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flow chart illustrating an exemplary method of processing asingleton task.

FIG. 2 is a component block diagram illustrating an exemplary system forprocessing a singleton task.

FIG. 3 is a flow chart illustrating an exemplary method of processing asingleton task.

FIG. 4 is an illustration of an example of a lease storage component.

FIG. 5 is an illustration of an example of a server successfullyclaiming an expired lease.

FIG. 6 is an illustration of an example of a server determining a leaseis valid.

FIG. 7 is an illustration of an example of a server unsuccessfullyclaiming a lease that is expired.

FIG. 8 is an illustration of an exemplary computer-readable mediumwherein processor-executable instructions configured to embody one ormore of the provisions set forth herein may be comprised.

FIG. 9 illustrates an exemplary computing environment wherein one ormore of the provisions set forth herein may be implemented.

DETAILED DESCRIPTION

The claimed subject matter is now described with reference to thedrawings, wherein like reference numerals are used to refer to likeelements throughout. In the following description, for purposes ofexplanation, numerous specific details are set forth in order to providea thorough understanding of the claimed subject matter. It may beevident, however, that the claimed subject matter may be practicedwithout these specific details. In other instances, structures anddevices are illustrated in block diagram form in order to facilitatedescribing the claimed subject matter.

Within a computer environment, the processing of tasks may bedistributed among multiple server instances to increase robustness,capacity, and performance. Nevertheless, it is common for some tasks tobe singleton tasks. That is, it may be advantageous to have a subset ofserver instances (e.g., a single server instance) perform the singletontask instead of many server instances. In one example, a contract mayspecify a particular number of server instances that may process asingleton task. Providing that singleton tasks are performed correctlybecomes complicated when new server instances are introduced into thecomputer environment (e.g., when a failed server instance is replaced)and/or when server instances are removed from the computer environment(e.g., server failure, lower capacity requirements, etc.). Because thecomputer environment may be in an always on state, there is no globalbootstrap concept that may be used to provide compliance with contractsregarding singleton tasks. Moreover, server instances may have minimalknowledge of other server instances in an effort to minimize statemanagement. Because of the lack of bootstrap and the minimal awarenessbetween server instances, human intervention may be currently needed toassign singleton tasks when new servers are introduced into a computingenvironment. Requiring human intervention can introduce large timedelays (e.g., if a failure occurs in the middle of the night and is notdiscovered until the morning) and introduce an opportunity for humanerror.

Among other things, a technique for processing a singleton task isprovided herein. In one example, the technique may be implemented as aprotocol used by multiple server instances to process a singleton taskaccording to a contract specifying a desired number of server instancesthat may perform the singleton task. The protocol may be implementedacross multiple server instances coordinated through a databasecomprising rows having lease information (e.g., a current leaseexpiration) corresponding to singleton tasks. The protocol may be basedupon an optimistic concurrency implemented though a leasing modelfacilitated through the database. In this way, leases may be awarded andlease duration and fault recovery durations may be specified.

One embodiment of processing a singleton task is illustrated by anexemplary method 100 in FIG. 1. At 102, the method begins. At 104, alease for a singleton task may be determined as valid or expired. Forexample, a lease may be determined as valid if a current leaseexpiration of the lease exceeds the current time (e.g., the current timehas not yet reached the expiration time of the lease). Otherwise, thelease may be determined as expired if the current time exceeds thecurrent lease expiration (e.g., the current time has reached theexpiration time of the lease). At 106, if the lease is expired, then anattempt may be made to claim the lease with a new lease expiration. Forexample, a database operation to update the current lease expiration ofthe lease with the new lease expiration may be performed. If successful,the lease will be claimed by the server instance performing the update.It may be appreciated that a singleton task may be performed by a subsetof server instances that claim a lease for a singleton task. That is,even though the examples described herein refer to a single serverinstance claiming a lease of a singleton task, it may be appreciatedthat multiple server instances may claim a lease of a singleton task(e.g., a small subset of server instances). It may be appreciated thatmultiple server instances may attempt to claim the lease of thesingleton task, but because the singleton task may be designated by acontract to be performed by merely one server instance, that all but oneserver instance may fail at claiming the lease, for example.

At 108, upon successfully claiming the lease, the singleton task may beprocessed until the new lease expiration expires. At this point, theserver instance has claimed the lease for the singleton task and cantake action based upon that claim until the new lease expirationexpires. Other server instances may be barred from processing thesingleton task based upon the claim to the lease. This provides that thesingleton task is processed by the designated number of serverinstances, for example, as specified by a contract. At 110, the methodends.

FIG. 2 illustrates an example 200 of a system 216 configured forprocessing a singleton task. The system 216 may comprise a validitydetermination component 204, a lease claim component 206, an executioncomponent 208, and/or a lease extension component 210. In one example,the system 216 may be associated with a lease storage component 212. Inanother example, the system 216 may comprise the lease storage component212. The lease storage component 212 (e.g., a lease storage component402 of FIG. 4) may be, for example, a database table configured to storeone or more rows, respective rows comprising information of a singletontask and a lease for the singleton task (e.g., a singleton task (2) &lease (2) 214).

The system 216 may be associated with a server (1) 202 within a computerenvironment. For example, the system 216 may be configured to performfunctionality of a steady state protocol that server (1) 202 may executein regard to performing singleton tasks as defined by a contract. It maybe appreciated that the computer environment may comprise multipleservers, respective servers configured to process singleton tasksthrough instances of the system 216.

The validity determination component 204 may be configured to determinewhether a lease for a singleton task is valid or expired. For example,the lease may be valid if a current lease expiration exceeds a currenttime, otherwise the lease may be expired if the current time exceeds thecurrent lease expiration. Upon determining the lease is valid, thevalidity determination component 204 may be configured to wait until acurrent time exceeds the current lease expiration, and once the currentlease expiration is exceeded, then again determine whether the lease forthe singleton task is valid or expired. The validity determinationcomponent 204 may be configured to wait for a valid lease to expirebecause another server may be processing the singleton task, whereas ifyet another server begins processing the singleton task, then a contractmay be violated because too many servers are processing the singletontask.

In one example, the server (1) 202 may request 218 the validitydetermination component 204 to check a lease for the singleton task (2).The validity determination component 204 may make a determination 220 asto whether the singleton task (2) & lease (2) 214 within the leasestorage component 212 is valid. If the singleton task (2) & lease (2)214 is valid, then the validity determination component 204 may waituntil the current time exceeds the current lease expiration, and oncethe current lease expiration is exceeded, then again determine whetherthe lease for the singleton task is valid or expired. Otherwise, if thelease singleton task (2) & lease (2) 214 is expired, the lease claimcomponent 206 may attempt to claim the singleton task (2) & lease (2)214.

The lease claim component 206 may be configured to attempt to claim thelease with a new lease expiration based upon the lease being expired.That is, the lease claim component 206 may attempt to update a currentlease expiration within a database row corresponding to a singleton taskwith the new lease expiration. The update may be successful or fail dueto other servers attempting to claim the lease of the singleton task. Inone example, the lease claim component 206, upon a determination thatthe singleton task (2) & lease (2) 214 is expired, may attempt to claim222 the singleton task (2) & lease (2) 214 within the lease storagecomponent 212. For example, a new lease expiration based upon a currenttime and a pre-defined lease duration may be used to update a currentlease expiration of the singleton task (2) & lease (2) 214. Thepre-defined lease duration may be defined based upon efficiency and/ortime to detect a failure. For example, a longer pre-defined leaseduration allows a server to process a singleton task longer to increaseprocessing efficiency. That is, strain/load on the validitydetermination component 204 may be reduced by extending a pre-definedlease duration, for example, for long running operations. A shorterpre-defined lease duration may reduce the time to detect that a serverhas failed.

It may be appreciated that the lease claim component 206 may beconfigured to attempt to claim the lease based upon an optimisticconcurrent database design. That is, the lease claim component 206 mayassume the claim (e.g., an update to a database row) will succeedwithout conflict, and may be configured to properly handle situations inwhich a conflict results. In one example, an initial database read maybe performed to determine database information (e.g., a tag regardingdatabase conflicts). It may be appreciated that a variety of databaseconflict detection mechanisms may be utilized to determine databaseinformation. The database information may be utilized by the lease claimcomponent 206 when attempting to claim a lease (e.g., utilizing the datainformation when optimistically updating a database).

The execution component 208 may be configured to initiate processing ofthe singleton task until the new lease expiration expires, based upon asuccessful attempt to claim the lease. For example, if the singletontask (2) & lease (2) 214 is successfully claimed, then the executioncomponent 208 may initiate processing of the singleton task 2 by server(1) 202. The lease extension component 210 may be configured to extendor relinquish the claim to the lease based the new lease expirationexpiring. For example, the extension component 210 may extend orrelinquish 226 the lease for the singleton task (2) & lease (2) 214. Toextend the lease, the extension component 210 may update the expired newlease expiration with a second new lease expiration, thus allowing theserver (1) 202 to continue processing the singleton task (2). Extendingthe lease may be advantageous when the server (1) 202 has a lot of stateand/or overhead associated with the singleton task (2), which wouldotherwise be replicated if a new server began processing the singletontask (2). If the claim is relinquished, then the validity determinationcomponent 204 may be configured to again determine whether the lease forthe singleton task is valid or expired.

FIG. 3 illustrates a flow diagram 300 of a method for processing asingleton task. At 302, the method begins. At 304, a lease may be readfrom a database. For example, a row comprising lease data (e.g., acurrent lease expiration of a lease) of a singleton task may be read. At306, a determination may be made as to whether the lease is valid orexpired. If the lease is valid, then at 308, a server instance may waitand/or perform other processing than the singleton task until a currentlease expiration expires (e.g., a current time exceeds the current leaseexpiration), and then the method again begins at 302.

If the lease is determined to have expired, at 306, then at 310, anattempt to claim the lease is performed. For example, an update to adatabase row comprising the lease data may be performed using a newlease expiration to update the current lease expiration. At 312, adetermination may be made as to whether the claim was successful (e.g.,was the database row successfully updated or not). If the claim wasunsuccessful, then the method again begins at 302.

If the claim was successful, at 312, then at 314, the singleton task maybe processed until the new lease expiration expires. At 316, the leasemay be extended, whereupon an attempt to claim the lease may beperformed (e.g., the attempt to claim the lease 310), otherwise thelease may be relinquished, whereupon the method again beings at 302.

It may be appreciated that multiple instances of the flow diagram 300may be executed in a continuous loop for respective singleton taskswithin a lease storage component. The multiple instances of the flowdiagram 300 may be implemented as a protocol within one or more serverinstances to provide that singleton tasks are executed per contractsspecifying a desirable number of server instances that may process thesingleton tasks.

FIG. 4 illustrates an example 400 of a lease storage component 402. Inone example, the lease storage component 402 may comprise a databasetable having multiple rows, respective rows associated with a singletontask (e.g., row 1 comprising lease data for singleton task (1), row 2comprises lease data for singleton task (2), etc.). A row within thedatabase table may comprise lease data, such as a lease expiration. Forexample, row 1 comprises lease expiration (1), row 2 comprises leaseexpiration (2), etc. It may be appreciated that the lease storagecomponent 402 may be implemented in through a variety of techniques(e.g., a data structure comprising lease data for singleton tasks).

FIG. 5 illustrates an example 500 of a server successfully claiming anexpired lease. A server (1) 502, a server (2) 504, a server (3) 506,and/or other servers may be configured to perform various tasks within acomputing environment. It may be appreciated that an arbitrarily largeset of servers may be configured to process singleton tasks based uponone or more instances of a singleton task processing protocol 516 (e.g.,a system 216 in FIG. 2). It may also be appreciated that multipleinstances of the singleton task processing protocol 516 may be utilized(e.g., executed within a loop as a steady state algorithm) within aserver for multiple singleton tasks.

In one example, a lease storage component 508 may be configured with anemail retrieval singleton task 510 having a lease comprising a currentlease expiration 512. The lease storage component 508 and the singletontask processing protocol 516 may be implemented as a leasing modelthrough a database. Server (1) 502 through server (N) may executeinstances of the singleton task processing protocol 516 to determinevalidity of the lease for the email retrieval singleton task 510; claimthe lease by attempting to update the current lease expiration 512 witha new lease expiration; and/or process the email retrieval singletontask 510 based upon successfully claiming the lease when the currentlease expiration 512 is expired.

For example, server (1) 502 may determine through the singleton taskprocessing protocol 516 that the current lease expiration 512 hasexpired for the email retrieval singleton task 510. The server (1) 502may successfully claim the current lease by updating the current leaseexpiration 512 with a new lease expiration 514. It may be appreciatedthat server (1) has ownership of the lease once claimed, whereas server(2) 504 and/or other servers do not own the lease and may not processthe email retrieval singleton task 510, for example, because a contractmay specify that no more than one server may process the email retrievalsingleton task 510. Once claimed, the server (1) 502 may process theemail retrieval singleton task 510 until expiration of the new leaseexpiration 514, whereupon the server (1) 502 may extend or relinquishthe claim to the lease.

FIG. 6 illustrates an example 600 of a server determining a lease isvalid. A server (1) 602 and/or other servers may be configured toperform various tasks within a computing environment. Respective serversmay be configured to process singleton tasks based upon instances of asingleton task processing protocol 616 (e.g., a system 216 in FIG. 2).In one example, a lease storage component 604 may be configured with anemail retrieval singleton task 606 having a lease comprising a currentlease expiration 608. The lease storage component 604 and the singletontask processing protocol 616 may be implemented as a leasing modelthrough a database. Server (1) 602 through server (N) may executeinstances of the singleton task processing protocol 616.

In one example, the lease for the email retrieval singleton task 606 maybe determined as valid because the current lease expiration 608 exceedsa current time, thus another server may be processing the emailretrieval singleton task 606. The singleton task processing protocol 616may wait or have its associated server (e.g., server (1) 602) processother tasks until a current time exceeds the current lease expiration.This wait period allows the current lease expiration 608 to potentiallyexpire. When the current time is exceeded by the current leaseexpiration (e.g., the wait period has lapsed), then the singleton taskprocessing protocol 616 of respective servers (e.g., server (1) 602),may again determine whether the lease for the email retrieval singletontask 606 is valid or expired.

FIG. 7 illustrates an example 700 of a server unsuccessfully claiming alease that is expired. A server (1) 702 and/or other servers may beconfigured to perform various tasks within a computing environment.Respective servers may be configured to process singleton tasks basedupon instances of a singleton task processing protocol 716 (e.g., asystem 216 in FIG. 2). In one example, a lease storage component 704 maybe configured with an email retrieval singleton task 706 having a leasecomprising a current lease expiration 708. The lease storage component704 and the singleton task processing protocol 716 may be implemented asa leasing model through a database. Server (1) 702 through server (N)may execute instances of the singleton task processing protocol 716.

In one example, the lease for the email retrieval singleton task 706 maybe determined as expired because a current time exceeds the currentlease expiration 708. The singleton task processing protocol 716 mayattempt to claim the lease for the email retrieval singleton task 706 byupdating the current lease expiration 708 within the lease storagecomponent with a new lease expiration. Because another server maysuccessfully claim the lease, the singleton task processing protocol 716of server (1) 702, for example, may unsuccessfully claim the lease. Uponunsuccessfully claiming the lease, the singleton task processingprotocol 716 again determines whether the lease for the email retrievalsingleton task 706 is valid or expired (e.g., performing a loop withinthe singleton task processing protocol 716 algorithm).

The leasing model implemented through the singleton task processingprotocol 716 allows a contract defining a particular sub-set of serverinstances (e.g., a single server instance) that can concurrently processsingleton task to be upheld. This allows singleton task ownership to bereliably assigned across arbitrary autonomous server instances that mayhave minimal knowledge of one another and/or situations where new serverinstances are introduced into an always on computer environment withoutthe benefit of bootstrap code.

Still another embodiment involves a computer-readable medium comprisingprocessor-executable instructions configured to implement one or more ofthe techniques presented herein. An exemplary computer-readable mediumthat may be devised in these ways is illustrated in FIG. 8, wherein theimplementation 800 comprises a computer-readable medium 816 (e.g., aCD-R, DVD-R, or a platter of a hard disk drive), on which is encodedcomputer-readable data 814. This computer-readable data 814 in turncomprises a set of computer instructions 812 configured to operateaccording to one or more of the principles set forth herein. In one suchembodiment 800, the processor-executable instructions 812 may beconfigured to perform a method 810, such as the exemplary method 100 ofFIG. 1, for example. In another such embodiment, theprocessor-executable instructions 812 may be configured to implement asystem, such as the exemplary system 200 of FIG. 2, for example. Manysuch computer-readable media may be devised by those of ordinary skillin the art that are configured to operate in accordance with thetechniques presented herein.

Although the subject matter has been described in language specific tostructural features and/or methodological acts, it is to be understoodthat the subject matter defined in the appended claims is notnecessarily limited to the specific features or acts described above.Rather, the specific features and acts described above are disclosed asexample forms of implementing the claims.

As used in this application, the terms “component,” “module,” “system”,“interface”, and the like are generally intended to refer to acomputer-related entity, either hardware, a combination of hardware andsoftware, software, or software in execution. For example, a componentmay be, but is not limited to being, a process running on a processor, aprocessor, an object, an executable, a thread of execution, a program,and/or a computer. By way of illustration, both an application runningon a controller and the controller can be a component. One or morecomponents may reside within a process and/or thread of execution and acomponent may be localized on one computer and/or distributed betweentwo or more computers.

Furthermore, the claimed subject matter may be implemented as a method,apparatus, or article of manufacture using standard programming and/orengineering techniques to produce software, firmware, hardware, or anycombination thereof to control a computer to implement the disclosedsubject matter. The term “article of manufacture” as used herein isintended to encompass a computer program accessible from anycomputer-readable device, carrier, or media. Of course, those skilled inthe art will recognize many modifications may be made to thisconfiguration without departing from the scope or spirit of the claimedsubject matter.

FIG. 9 and the following discussion provide a brief, general descriptionof a suitable computing environment to implement embodiments of one ormore of the provisions set forth herein. The operating environment ofFIG. 9 is only one example of a suitable operating environment and isnot intended to suggest any limitation as to the scope of use orfunctionality of the operating environment. Example computing devicesinclude, but are not limited to, personal computers, server computers,hand-held or laptop devices, mobile devices (such as mobile phones,Personal Digital Assistants (PDAs), media players, and the like),multiprocessor systems, consumer electronics, mini computers, mainframecomputers, distributed computing environments that include any of theabove systems or devices, and the like.

Although not required, embodiments are described in the general contextof “computer readable instructions” being executed by one or morecomputing devices. Computer readable instructions may be distributed viacomputer readable media (discussed below). Computer readableinstructions may be implemented as program modules, such as functions,objects, Application Programming Interfaces (APIs), data structures, andthe like, that perform particular tasks or implement particular abstractdata types. Typically, the functionality of the computer readableinstructions may be combined or distributed as desired in variousenvironments.

FIG. 9 illustrates an example of a system 910 comprising a computingdevice 912 configured to implement one or more embodiments providedherein. In one configuration, computing device 912 includes at least oneprocessing unit 916 and memory 918. Depending on the exact configurationand type of computing device, memory 918 may be volatile (such as RAM,for example), non-volatile (such as ROM, flash memory, etc., forexample) or some combination of the two. This configuration isillustrated in FIG. 9 by dashed line 914.

In other embodiments, device 912 may include additional features and/orfunctionality. For example, device 912 may also include additionalstorage (e.g., removable and/or non-removable) including, but notlimited to, magnetic storage, optical storage, and the like. Suchadditional storage is illustrated in FIG. 9 by storage 920. In oneembodiment, computer readable instructions to implement one or moreembodiments provided herein may be in storage 920. Storage 920 may alsostore other computer readable instructions to implement an operatingsystem, an application program, and the like. Computer readableinstructions may be loaded in memory 918 for execution by processingunit 916, for example.

The term “computer readable media” as used herein includes computerstorage media. Computer storage media includes volatile and nonvolatile,removable and non-removable media implemented in any method ortechnology for storage of information such as computer readableinstructions or other data. Memory 918 and storage 920 are examples ofcomputer storage media. Computer storage media includes, but is notlimited to, RAM, ROM, EEPROM, flash memory or other memory technology,CD-ROM, Digital Versatile Disks (DVDs) or other optical storage,magnetic cassettes, magnetic tape, magnetic disk storage or othermagnetic storage devices, or any other medium which can be used to storethe desired information and which can be accessed by device 912. Anysuch computer storage media may be part of device 912.

Device 912 may also include communication connection(s) 926 that allowsdevice 912 to communicate with other devices. Communicationconnection(s) 926 may include, but is not limited to, a modem, a NetworkInterface Card (NIC), an integrated network interface, a radio frequencytransmitter/receiver, an infrared port, a USB connection, or otherinterfaces for connecting computing device 912 to other computingdevices. Communication connection(s) 926 may include a wired connectionor a wireless connection. Communication connection(s) 926 may transmitand/or receive communication media.

The term “computer readable media” may include communication media.Communication media typically embodies computer readable instructions orother data in a “modulated data signal” such as a carrier wave or othertransport mechanism and includes any information delivery media. Theterm “modulated data signal” may include a signal that has one or moreof its characteristics set or changed in such a manner as to encodeinformation in the signal.

Device 912 may include input device(s) 924 such as keyboard, mouse, pen,voice input device, touch input device, infrared cameras, video inputdevices, and/or any other input device. Output device(s) 922 such as oneor more displays, speakers, printers, and/or any other output device mayalso be included in device 912. Input device(s) 924 and output device(s)922 may be connected to device 912 via a wired connection, wirelessconnection, or any combination thereof. In one embodiment, an inputdevice or an output device from another computing device may be used asinput device(s) 924 or output device(s) 922 for computing device 912.

Components of computing device 912 may be connected by variousinterconnects, such as a bus. Such interconnects may include aPeripheral Component Interconnect (PCI), such as PCI Express, aUniversal Serial Bus (USB), firewire (IEEE 1394), an optical busstructure, and the like. In another embodiment, components of computingdevice 912 may be interconnected by a network. For example, memory 918may be comprised of multiple physical memory units located in differentphysical locations interconnected by a network.

Those skilled in the art will realize that storage devices utilized tostore computer readable instructions may be distributed across anetwork. For example, a computing device 930 accessible via a network928 may store computer readable instructions to implement one or moreembodiments provided herein. Computing device 912 may access computingdevice 930 and download a part or all of the computer readableinstructions for execution. Alternatively, computing device 912 maydownload pieces of the computer readable instructions, as needed, orsome instructions may be executed at computing device 912 and some atcomputing device 930.

Various operations of embodiments are provided herein. In oneembodiment, one or more of the operations described may constitutecomputer readable instructions stored on one or more computer readablemedia, which if executed by a computing device, will cause the computingdevice to perform the operations described. The order in which some orall of the operations are described should not be construed as to implythat these operations are necessarily order dependent. Alternativeordering will be appreciated by one skilled in the art having thebenefit of this description. Further, it will be understood that not alloperations are necessarily present in each embodiment provided herein.

Moreover, the word “exemplary” is used herein to mean serving as anexample, instance, or illustration. Any aspect or design describedherein as “exemplary” is not necessarily to be construed as advantageousover other aspects or designs. Rather, use of the word exemplary isintended to present concepts in a concrete fashion. As used in thisapplication, the term “or” is intended to mean an inclusive “or” ratherthan an exclusive “or”. That is, unless specified otherwise, or clearfrom context, “X employs A or B” is intended to mean any of the naturalinclusive permutations. That is, if X employs A; X employs B; or Xemploys both A and B, then “X employs A or B” is satisfied under any ofthe foregoing instances. In addition, the articles “a” and “an” as usedin this application and the appended claims may generally be construedto mean “one or more” unless specified otherwise or clear from contextto be directed to a singular form.

Also, although the disclosure has been shown and described with respectto one or more implementations, equivalent alterations and modificationswill occur to others skilled in the art based upon a reading andunderstanding of this specification and the annexed drawings. Thedisclosure includes all such modifications and alterations and islimited only by the scope of the following claims. In particular regardto the various functions performed by the above described components(e.g., elements, resources, etc.), the terms used to describe suchcomponents are intended to correspond, unless otherwise indicated, toany component which performs the specified function of the describedcomponent (e.g., that is functionally equivalent), even though notstructurally equivalent to the disclosed structure which performs thefunction in the herein illustrated exemplary implementations of thedisclosure. In addition, while a particular feature of the disclosuremay have been disclosed with respect to only one of severalimplementations, such feature may be combined with one or more otherfeatures of the other implementations as may be desired and advantageousfor any given or particular application. Furthermore, to the extent thatthe terms “includes”, “having”, “has”, “with”, or variants thereof areused in either the detailed description or the claims, such terms areintended to be inclusive in a manner similar to the term “comprising.”

What is claimed is:
 1. A method of processing a singleton task, thesingleton task comprising-one or more tasks associated with an internetservice, the internet service being implemented using a server instanceand the singleton task processed based upon a protocol used by theserver instance, the protocol determining whether a lease for thesingleton task is valid or expired, the method comprising: reading leasedata for the singleton task from a database table, the lease dataspecifying a current lease expiration for the singleton task, thedatabase table comprising a first row and a second row, the first rowassociated with the singleton task and the lease data, the second rowassociated with a second singleton task and second lease data;responsive to determining the lease for the singleton task is validbased upon the reading, waiting for a current time to exceed the currentlease expiration for the singleton task, the lease valid when thecurrent time does not exceed the current lease expiration for thesingleton task; attempting to claim the lease, after the current timeexceeds the current lease expiration, by attempting to update, in thedatabase table, the current lease expiration with a new leaseexpiration; responsive to the attempting to claim being unsuccessful,determining whether the lease is valid, the attempting to claim beingunsuccessful when the current lease expiration does not update with thenew lease expiration; responsive to the attempting to claim beingsuccessful, processing the singleton task until the new lease expirationexpires; and responsive to expiration of the new lease expiration, atleast one of extending the lease or relinquishing the lease.
 2. Themethod of claim 1, the second singleton task different than thesingleton task.
 3. The method of claim 1, the second row different thanthe first row.
 4. The method of claim 1, the second lease dataspecifying a second current lease expiration for the second singletontask.
 5. The method of claim 1, the new lease expiration computed basedupon an expected execution time to process the singleton task.
 6. Themethod of claim 1, the attempting to claim the lease comprising:attempting to claim the lease based upon an optimistic concurrentdatabase design.
 7. The method of claim 1, comprising, prior to thereading lease data: obtaining the lease for the singleton task.
 8. Themethod of claim 1, the extending the lease comprising: updating the newlease expiration with a second new lease expiration.
 9. The method ofclaim 1, the new lease expiration based upon a pre-defined leaseduration.
 10. A system, comprising: one or more processing units; andmemory comprising instructions that when executed by at least one of theone or more processing units perform a method of processing a singletontask, the singleton task comprising one or more tasks associated with aninternet service, the internet service being implemented using a serverinstance and the singleton task processed based upon a protocol used bythe server instance, the protocol determining whether a lease for thesingleton task is valid or expired, the method comprising: reading leasedata for the singleton task from a database table, the lease dataspecifying a current lease expiration for the singleton task, thedatabase table comprising a first row and a second row, the first rowassociated with the singleton task and the lease data, the second rowassociated with a second singleton task and second lease data;responsive to determining the lease for the singleton task is validbased upon the reading, waiting for a current time to exceed the currentlease expiration for the singleton task, the lease valid when thecurrent time does not exceed the current lease expiration for thesingleton task; attempting to claim the lease, after the current timeexceeds the current lease expiration, by attempting to update, in thedatabase table, the current lease expiration with a new leaseexpiration; responsive to the attempting to claim being unsuccessful,determining whether the lease is valid, the attempting to claim beingunsuccessful when the current lease expiration does not update with thenew lease expiration; responsive to the attempting to claim beingsuccessful, processing the singleton task until the new lease expirationexpires; and responsive to expiration of the new lease expiration, atleast one of extending the lease or relinquishing the lease.
 11. Thesystem of claim 10, the second singleton task different than thesingleton task.
 12. The system of claim 10, the second row differentthan the first row.
 13. The system of claim 10, the second lease dataspecifying a second current lease expiration for the second singletontask.
 14. The system of claim 10, the new lease expiration computedbased upon an expected execution time to process the singleton task. 15.The system of claim 10, the attempting to claim the lease comprising:attempting to claim the lease based upon an optimistic concurrentdatabase design.
 16. The system of claim 10, the extending the leasecomprising: updating the new lease expiration with a second new leaseexpiration.
 17. The system of claim 10, the new lease expiration basedupon a pre-defined lease duration.
 18. A computer-readable storagemedia, excluding signals, comprising computer-executable instructionsthat when executed perform acts for processing a singleton task, thesingleton task comprising-one or more tasks associated with an internetservice, the internet service being implemented using a server instanceand the singleton task processed based upon a protocol used by theserver instance, the protocol determining whether a lease for thesingleton task is valid or expired, the acts comprising: reading leasedata for the singleton task from a database table, the lease dataspecifying a current lease expiration for the singleton task, thedatabase table comprising a first row and a second row, the first rowassociated with the singleton task and the lease data, the second rowassociated with a second singleton task and second lease data;responsive to determining the lease for the singleton task is validbased upon the reading, waiting for a current time to exceed the currentlease expiration for the singleton task, the lease valid when thecurrent time does not exceed the current lease expiration for thesingleton task; attempting to claim the lease, after the current timeexceeds the current lease expiration, by attempting to update, in thedatabase table, the current lease expiration with a new leaseexpiration; responsive to the attempting to claim being unsuccessful,determining whether the lease is valid, the attempting to claim beingunsuccessful when the current lease expiration does not update with thenew lease expiration; responsive to the attempting to claim beingsuccessful, processing the singleton task until the new lease expirationexpires; and responsive to expiration of the new lease expiration, atleast one of extending the lease or relinquishing the lease.
 19. Thecomputer-readable storage media of claim 18, the second singleton taskdifferent than the singleton task.
 20. The computer-readable storagemedia of claim 18, the second row different than the first row.